cmake_minimum_required(VERSION 3.10.2)
project(aeyeSensorController)
unset(AEYE_SDK_DEV)

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
set(NOT_MSVC $<NOT:$<CXX_COMPILER_ID:MSVC>>)

find_package(Threads REQUIRED)
find_package(AEyeSensorSDK REQUIRED)


add_executable(aeyeSensorController src/main.cpp)
target_compile_options(aeyeSensorController PRIVATE
        $<$<CXX_COMPILER_ID:MSVC>:/W2 /EHsc /permissive->
        $<${NOT_MSVC}:-Wall -Wextra -Wformat=2>
        )
set_target_properties(aeyeSensorController PROPERTIES
        CXX_STANDARD 14
        CXX_STANDARD_REQUIRED ON)

target_include_directories(aeyeSensorController PRIVATE include)
target_link_libraries(aeyeSensorController AEyeSensorSDK Threads::Threads)
